From a3d5971960ecfb6c1c488362c340bfc8bf39f1c4 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 2 Jun 2004 18:18:42 +0000 Subject: [PATCH] Don't close the dialog on focus out of the size entry. (#143505, David 2004-06-02 Matthias Clasen * gtk/gtkfontsel.c (gtk_font_selection_size_focus_out): Don't close the dialog on focus out of the size entry. (#143505, David Hawthorne) --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ gtk/gtkfontsel.c | 11 ++++++++++- 5 files changed, 34 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index be79db548c..0e85b6a8db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-06-02 Matthias Clasen + + * gtk/gtkfontsel.c (gtk_font_selection_size_focus_out): Don't + close the dialog on focus out of the size entry. (#143505, + David Hawthorne) + 2004-06-02 Federico Mena Quintero Fix #138807. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index be79db548c..0e85b6a8db 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2004-06-02 Matthias Clasen + + * gtk/gtkfontsel.c (gtk_font_selection_size_focus_out): Don't + close the dialog on focus out of the size entry. (#143505, + David Hawthorne) + 2004-06-02 Federico Mena Quintero Fix #138807. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index be79db548c..0e85b6a8db 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2004-06-02 Matthias Clasen + + * gtk/gtkfontsel.c (gtk_font_selection_size_focus_out): Don't + close the dialog on focus out of the size entry. (#143505, + David Hawthorne) + 2004-06-02 Federico Mena Quintero Fix #138807. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index be79db548c..0e85b6a8db 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2004-06-02 Matthias Clasen + + * gtk/gtkfontsel.c (gtk_font_selection_size_focus_out): Don't + close the dialog on focus out of the size entry. (#143505, + David Hawthorne) + 2004-06-02 Federico Mena Quintero Fix #138807. diff --git a/gtk/gtkfontsel.c b/gtk/gtkfontsel.c index a59ce09e5c..64c7b312d0 100644 --- a/gtk/gtkfontsel.c +++ b/gtk/gtkfontsel.c @@ -998,7 +998,16 @@ gtk_font_selection_size_focus_out (GtkWidget *w, GdkEventFocus *event, gpointer data) { - gtk_font_selection_size_activate (w, data); + GtkFontSelection *fontsel; + gint new_size; + const gchar *text; + + fontsel = GTK_FONT_SELECTION (data); + + text = gtk_entry_get_text (GTK_ENTRY (fontsel->size_entry)); + new_size = MAX (0.1, atof (text) * PANGO_SCALE + 0.5); + + gtk_font_selection_set_size (fontsel, new_size); return TRUE; } -- 2.30.2